package com.FOD.entities;

import android.content.Context;
import android.util.Log;
import android.widget.ArrayAdapter;

import com.FOD.clases.R;

public class PacienteUsuario {

	private int id;
	private int usuario_id;
	private String ocupacion;
	private int estadoCivil;
	private boolean tabaquismo;
	private int escolaridad;
	private String dominancia;
	private boolean alcoholismo;	

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getUsuario_id() {
		return usuario_id;
	}
	public void setUsuario_id(int usuario_id) {
		this.usuario_id = usuario_id;
	}
	public String getOcupacion() {
		return ocupacion;
	}
	public void setOcupacion(String ocupacion) {
		this.ocupacion = ocupacion;
	}
	public int getEstadoCivil() {
		return estadoCivil;
	}
	public void setEstadoCivil(int estadoCivil) {
		this.estadoCivil = estadoCivil;
	}
	public boolean isTabaquismo() {
		return tabaquismo;
	}
	public void setTabaquismo(boolean tabaquismo) {
		this.tabaquismo = tabaquismo;
	}
	public int getEscolaridad() {
		return escolaridad;
	}
	public void setEscolaridad(int escolaridad) {
		this.escolaridad = escolaridad;
	}
	public String getDominancia() {
		return dominancia;
	}
	public void setDominancia(String dominancia) {
		this.dominancia = dominancia;
	}
	public boolean isAlcoholismo() {
		return alcoholismo;
	}
	public void setAlcoholismo(boolean alcoholismo) {
		this.alcoholismo = alcoholismo;
	}

	public int getConverterCivilStatenToInt(String civilState, Context rootView){
		ArrayAdapter<CharSequence> adapter_civil_state = ArrayAdapter.createFromResource(rootView,R.array.state_civil_spinner, android.R.layout.simple_spinner_item);
		return adapter_civil_state.getPosition(civilState);
	}

	public int getConverterStudiesToInt(String studies, Context rootView){
		ArrayAdapter<CharSequence> adapter_studies = ArrayAdapter.createFromResource(rootView,R.array.studies_spinner, android.R.layout.simple_spinner_item);
		return adapter_studies.getPosition(studies);
	}

	public int getConverterBloodTypeToInt(String bloodType, Context rootView){
		ArrayAdapter<CharSequence> blood_type = ArrayAdapter.createFromResource(rootView,R.array.blood_type_spinner, android.R.layout.simple_spinner_item);
		return blood_type.getPosition(bloodType);
	}

	public String getConverterCivilStatenToString(int civilState, Context rootView){
		ArrayAdapter<CharSequence> adapter_civil_state = ArrayAdapter.createFromResource(rootView,R.array.state_civil_spinner, android.R.layout.simple_spinner_item);
		return adapter_civil_state.getItem(civilState).toString();
	}

	public String getConverterStudiesToString(int studies, Context rootView){
		ArrayAdapter<CharSequence> adapter_studies = ArrayAdapter.createFromResource(rootView,R.array.studies_spinner, android.R.layout.simple_spinner_item);
		return adapter_studies.getItem(studies).toString();

	}
}
